#include "worker.h"
#include <QCoreApplication>
#include <QThread>
int main(int argc, char *argv[]) {
  QCoreApplication a(argc, argv);
  QThread th1;
  QThread th2;
  Worker1 work1;
  Worker2 work2;
  work1.moveToThread(&th1);
  work2.moveToThread(&th2);
  QObject::connect(&th1, &QThread::started, &work1, &Worker1::run);
  QObject::connect(&th2, &QThread::started, &work2, &Worker2::run);

  th1.start();
  th2.start();
  return a.exec();
}
